package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread t=Thread.currentThread();
        System.out.println(t);
        doSome();
    }

    public static void doSome(){
        Thread t=Thread.currentThread();
        System.out.println(t);
        System.out.println("名字"+t.getName());
        System.out.println("优先级"+t.getPriority());
        System.out.println("标识"+t.getId());

        System.out.println("是否活着"+t.isAlive());
        System.out.println("是否为守护线程"+t.isDaemon());
        System.out.println("是否被中断"+t.isInterrupted());
    }
}
